﻿using System;

namespace XUtliPoolLib
{
	// Token: 0x02000198 RID: 408
	public class CommonObjectPool<T> where T : new()
	{
		// Token: 0x060008D7 RID: 2263 RVA: 0x0002F2EC File Offset: 0x0002D4EC
		public static object Create()
		{
			return Activator.CreateInstance<T>();
		}

		// Token: 0x060008D8 RID: 2264 RVA: 0x0002F308 File Offset: 0x0002D508
		public static T Get()
		{
			return (T)((object)CommonObjectPool<T>.s_Pool.Get());
		}

		// Token: 0x060008D9 RID: 2265 RVA: 0x0002F329 File Offset: 0x0002D529
		public static void Release(T toRelease)
		{
			CommonObjectPool<T>.s_Pool.Release(toRelease);
		}

		// Token: 0x04000402 RID: 1026
		private static readonly ObjectPool<object> s_Pool = new ObjectPool<object>(new ObjectPool<object>.CreateObj(CommonObjectPool<T>.Create), null, null);
	}
}
